
class Father{
    public String name="父亲";

    public Father(String name) {
        this.name = name;
    }

    public void fun(){
        System.out.println("我是"+name);
    }
}

class Son extends Father{
    public int number;
    public Son(String name) {
        super(name);
    }

    @Override
    public void fun(){
        System.out.println("男孩："+name);
    }
    public void fun12(){
        ;
    }
}
class Daughter extends Father{
    public Daughter(String name) {
        super(name);
    }

    @Override
    public void fun(){
        System.out.println("女孩："+name);
    }
}
public class TestDemo {
    public static void test(Father father){
        father.fun();
    }
    public static void main(String[] args) {
        Father father=new Son("儿子");

    }
}
